package com.px.dal;

import org.apache.ibatis.session.SqlSession;

import com.px.idal.IAdminMapper;
import com.px.model.AdminInfo;
import com.px.mybatisunit.MyBatisUtil;

public class AdminMapper {
	// 创建SqlSession对象的实例
	SqlSession session = MyBatisUtil.getsqlSession(true);
	// IAdminMapper接口通过sqlsession的getmap方法,完成实现,全部自动化
	IAdminMapper mapper = session.getMapper(IAdminMapper.class);

	/**
	 * 管理员登录方法
	 * 
	 * */
	public AdminInfo validateAdminLogin(AdminInfo adminInfo) {
		return mapper.validateAdminLogin(adminInfo);
	}
}
